﻿<!doctype html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Gramos - Admin Dashboard</title>

    <!-- begin::global styles -->
    <link rel="stylesheet" href="assets/vendors/bundle.css" type="text/css">
    <!-- end::global styles -->

    <!-- bootstrap -->
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- bootstrap -->

    <!-- begin::custom styles -->
    <link rel="stylesheet" href="assets/css/app.css" type="text/css">
    <link rel="stylesheet" href="assets/css/custom.css" type="text/css">
    <!-- end::custom styles -->
    <!-- 模态框 -->
    <link rel="stylesheet" href="css/tables.css">
    <script src="JS/modal.js"></script>
    <!-- 模态框 -->
</head>

<body>

    <!-- begin::page loader-->
    <div class="page-loader">
        <div class="spinner-border"></div>
        <span>Loading ...</span>
    </div>
    <!-- end::page loader -->

    <!-- begin::sidebar -->
    <div class="sidebar">
        <ul class="nav nav-pills nav-justified m-b-30" id="pills-tab" role="tablist">
            <li class="nav-item">
                <a class="nav-link" id="notifications-tab" data-toggle="pill" href="#notifications" role="tab"
                    aria-controls="notifications" aria-selected="false">
                    <i class="fa fa-bell"></i>
                </a>
            </li>
            <li class="nav-item">
                <a class="nav-link" id="settings-tab" data-toggle="pill" href="#settings" role="tab"
                    aria-controls="settings" aria-selected="false">
                    <i class="ti-settings"></i>
                </a>
            </li>
        </ul>
        <div class="tab-content" id="pills-tabContent">
            <div class="tab-pane" id="notifications" role="tabpanel" aria-labelledby="notifications-tab">
                <div class="tab-pane-body">
                    <h5 class="font-weight-bold m-b-20">Notifications</h5>
                    <div>
                        <p class="text-muted">Today</p>
                        <ul class="list-group list-group-flush m-b-10">
                            <li class="list-group-item d-flex p-l-r-0">
                                <div>
                                    <figure class="avatar avatar-xs m-r-10">
                                        <span class="avatar-title bg-success rounded-circle">A</span>
                                    </figure>
                                </div>
                                <div>
                                    <p class="m-b-0">
                                        <span class="badge small badge-danger">New</span>
                                        New user registration.
                                    </p>
                                    <ul class="list-inline small">
                                        <li class="list-inline-item text-muted">8 minute ago</li>
                                        <li class="list-inline-item">
                                            <a href="#">Mark Read</a>
                                        </li>
                                        <li class="list-inline-item">
                                            <a href="#">View</a>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                            <li class="list-group-item d-flex p-l-r-0">
                                <div>
                                    <figure class="avatar avatar-xs m-r-10">
                                        <span class="avatar-title rounded-circle">
                                            <i class="fa fa-cloud-upload"></i>
                                        </span>
                                    </figure>
                                </div>
                                <div>
                                    <p class="m-b-0">Files uploaded successfully.</p>
                                    <ul class="list-inline small">
                                        <li class="list-inline-item text-muted">50 minute ago</li>
                                        <li class="list-inline-item">
                                            <a href="#">Mark Read</a>
                                        </li>
                                        <li class="list-inline-item">
                                            <a href="#">View</a>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div>
                        <p class="text-muted">Yesterday</p>
                        <ul class="list-group list-group-flush m-b-10">
                            <li class="list-group-item d-flex p-l-r-0">
                                <div>
                                    <figure class="avatar avatar-xs m-r-10">
                                        <span class="avatar-title bg-warning rounded-circle">V</span>
                                    </figure>
                                </div>
                                <div>
                                    <p class="m-b-0">New user registration.</p>
                                    <ul class="list-inline small">
                                        <li class="list-inline-item text-muted">5 hours ago</li>
                                        <li class="list-inline-item">
                                            <a href="#">Mark Read</a>
                                        </li>
                                        <li class="list-inline-item">
                                            <a href="#">View</a>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                            <li class="list-group-item d-flex p-l-r-0">
                                <div>
                                    <figure class="avatar avatar-xs m-r-10">
                                        <span class="avatar-title rounded-circle">
                                            <i class="fa fa-file-o"></i>
                                        </span>
                                    </figure>
                                </div>
                                <div>
                                    <p class="m-b-0">Your invoice prepared.</p>
                                    <ul class="list-inline small">
                                        <li class="list-inline-item text-muted">10 hours ago</li>
                                        <li class="list-inline-item">
                                            <a href="#">Mark Read</a>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                            <li class="list-group-item d-flex p-l-r-0">
                                <div>
                                    <figure class="avatar avatar-xs m-r-10">
                                        <span class="avatar-title rounded-circle">
                                            <i class="fa fa-cloud-upload"></i>
                                        </span>
                                    </figure>
                                </div>
                                <div>
                                    <p class="m-b-0">Files uploaded successfully.</p>
                                    <ul class="list-inline small">
                                        <li class="list-inline-item text-muted">16 hours ago</li>
                                        <li class="list-inline-item">
                                            <a href="#">Mark Read</a>
                                        </li>
                                        <li class="list-inline-item">
                                            <a href="#">View</a>
                                        </li>
                                    </ul>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="tab-pane-footer">
                    <a href="#" class="btn btn-primary btn-block">Mark All Read</a>
                </div>
            </div>
            <div class="tab-pane" id="settings" role="tabpanel" aria-labelledby="settings-tab">
                <div class="tab-pane-body">
                    <div class="m-b-30">
                        <h5 class="font-weight-bold m-b-20">Settings</h5>
                        <h6 class="font-weight-bold">System</h6>
                        <ul class="list-group list-group-flush">
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Automatic updates</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch1" checked>
                                    <label class="custom-control-label" for="customSwitch1"></label>
                                </div>
                            </li>
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Current statistics</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch2" checked>
                                    <label class="custom-control-label" for="customSwitch2"></label>
                                </div>
                            </li>
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>User suggestions</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch3" checked>
                                    <label class="custom-control-label" for="customSwitch3"></label>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="m-b-30">
                        <h6 class="font-weight-bold">Accout</h6>
                        <ul class="list-group list-group-flush">
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Senior account security</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch4">
                                    <label class="custom-control-label" for="customSwitch4"></label>
                                </div>
                            </li>
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Account protection</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch5" checked>
                                    <label class="custom-control-label" for="customSwitch5"></label>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="m-b-30">
                        <h6 class="font-weight-bold">Notifications</h6>
                        <ul class="list-group list-group-flush">
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Browser notifications</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch6">
                                    <label class="custom-control-label" for="customSwitch6"></label>
                                </div>
                            </li>
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Mobile notifications</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch7">
                                    <label class="custom-control-label" for="customSwitch7"></label>
                                </div>
                            </li>
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Email subscription</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch8">
                                    <label class="custom-control-label" for="customSwitch8"></label>
                                </div>
                            </li>
                            <li class="list-group-item d-flex justify-content-between p-l-r-0">
                                <span>Sms notifications</span>
                                <div class="custom-control custom-switch">
                                    <input type="checkbox" class="custom-control-input" id="customSwitch9" checked>
                                    <label class="custom-control-label" for="customSwitch9"></label>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="tab-pane-footer">
                    <a href="#" class="btn btn-primary btn-block">Save Settings</a>
                </div>
            </div>
        </div>
    </div>
    <!-- end::sidebar -->

    <!-- begin::side menu -->
    <div class="side-menu">
        <div class='side-menu-body'>
            <ul>
                <li class="side-menu-divider">Navigation</li>

                <li class="open"><a href="#"><i class="icon ti-layers-alt"></i> <span>管理员UI</span> </a>
                    <ul>

                        <li class="open"><a href="tables.html">用户模块 </a>
                            <ul>
                                <li><a class="active" href="tables.html">用户表单(删除与搜索/修改) </a></li>
                                <!-- <li><a href="data-table.html">Data Table </a></li> -->
                                <li><a href="adduser-table.html">增加用户</a></li>
                            </ul>
                        </li>
                        <li ><a href="equipmentlist.html">器材模块 </a>
                            <ul>
                                <li><a  href="equipmentlist.html">器材表单(删除/搜索/修改) </a></li>
                                <!-- <li><a href="data-table.html">Data Table </a></li> -->
                                <li><a href="equipmentadd.html">增加器材</a></li>
                            </ul>
                        </li>

                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!-- end::side menu -->

    <!-- begin::navbar -->
    <nav class="navbar">
        <div class="container-fluid">

            <div class="header-logo">
                <a href="#">
                    <img src="assets/media/image/light-logo.png" alt="...">
                    <span class="logo-text d-none d-lg-block">Gramos</span>
                </a>
            </div>

            <div class="header-body">
                <ul class="navbar-nav">
                    <li class="nav-item dropdown d-none d-lg-block">
                        <a href="#" class="nav-link" data-toggle="dropdown">
                            <i class="fa fa-th-large"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-big dropdown-menu-nav-grid">
                            <div class="dropdown-menu-title">Quick menu</div>
                            <div class="dropdown-menu-body">
                                <div class="nav-grid">
                                    <div class="nav-grid-row">
                                        <a href="#" class="nav-grid-item">
                                            <i class="fa fa-address-book-o"></i>
                                            <span>App</span>
                                        </a>
                                        <a href="#" class="nav-grid-item">
                                            <i class="fa fa-envelope-o"></i>
                                            <span>Mail</span>
                                        </a>
                                    </div>
                                    <div class="nav-grid-row">
                                        <a href="#" class="nav-grid-item">
                                            <i class="fa fa-sticky-note"></i>
                                            <span>Chat</span>
                                        </a>
                                        <a href="#" class="nav-grid-item">
                                            <i class="fa fa-dashboard"></i>
                                            <span>Dashboard</span>
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                <form class="search">
                    <div class="input-group">
                        <input type="text" class="form-control" placeholder="Search ..."
                            aria-label="Recipient's username" aria-describedby="button-addon2">
                        <div class="input-group-append">
                            <button class="btn" type="button" id="button-addon2">
                                <i class="fa fa-search"></i>
                            </button>
                        </div>
                    </div>
                </form>
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a href="#" class="d-lg-none d-sm-block nav-link search-panel-open">
                            <i class="fa fa-search"></i>
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a href="#" class="nav-link nav-link-notify" data-toggle="dropdown">
                            <i class="fa fa-envelope"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right dropdown-menu-big">
                            <div class="dropdown-menu-title d-flex justify-content-between">
                                <div>
                                    <h6 class="text-uppercase font-size-12 m-b-0">Messages</h6>
                                    <small class="font-size-11 opacity-7">1 unread messages</small>
                                </div>
                            </div>
                            <div class="dropdown-menu-body">
                                <ul class="list-group list-group-flush">
                                    <a href="#" class="list-group-item d-flex link-1 hide-show-toggler">
                                        <div>
                                            <figure class="avatar avatar-sm m-r-15">
                                                <span class="avatar-title bg-success rounded-circle">M</span>
                                            </figure>
                                        </div>
                                        <div class="flex-grow-1">
                                            <h6 class="m-b-0 d-flex justify-content-between">
                                                Malanie Hanvey
                                                <i title="Read Mark" data-toggle="tooltip"
                                                    class="hide-show-toggler-item fa fa-check font-size-11"></i>
                                            </h6>
                                            <span class="text-muted m-r-10 small">PM 08:50</span>
                                            <span class="text-muted small">Have you mad...</span>
                                        </div>
                                    </a>
                                    <a href="#" class="list-group-item d-flex link-1 bg-light hide-show-toggler">
                                        <div>
                                            <figure class="avatar avatar-sm m-r-15">
                                                <span class="avatar-title bg-primary rounded-circle">TB</span>
                                            </figure>
                                        </div>
                                        <div class="flex-grow-1">
                                            <h6 class="m-b-0 d-flex justify-content-between">
                                                Kenneth Hune
                                                <i title="Read Mark" data-toggle="tooltip"
                                                    class="hide-show-toggler-item fa fa-circle-o font-size-11"></i>
                                            </h6>
                                            <span class="text-muted m-r-10 small">PM 10:23</span>
                                            <span class="text-muted small">I have a meetin...</span>
                                        </div>
                                    </a>
                                    <a href="#"
                                        class="list-group-item d-flex align-items-center link-1 hide-show-toggler">
                                        <div>
                                            <figure class="avatar avatar-sm m-r-15">
                                                <span class="avatar-title bg-danger rounded-circle">M</span>
                                            </figure>
                                        </div>
                                        <div class="flex-grow-1">
                                            <h6 class="m-b-0 d-flex justify-content-between">
                                                Kevin added
                                                <i title="Read Mark" data-toggle="tooltip"
                                                    class="hide-show-toggler-item fa fa-check font-size-11"></i>
                                            </h6>
                                            <span class="text-muted m-r-10 small">PM 08:50</span>
                                            <span class="text-muted small">Have you mad...</span>
                                        </div>
                                    </a>
                                    <a href="#"
                                        class="list-group-item d-flex align-items-center link-1 hide-show-toggler">
                                        <div>
                                            <figure class="avatar avatar-sm m-r-15">
                                                <span class="avatar-title bg-info rounded-circle">KC</span>
                                            </figure>
                                        </div>
                                        <div class="flex-grow-1">
                                            <h6 class="m-b-0 d-flex justify-content-between">
                                                Katherine Ember
                                                <i title="Read Mark" data-toggle="tooltip"
                                                    class="hide-show-toggler-item fa fa-check font-size-11"></i>
                                            </h6>
                                            <span class="text-muted m-r-10 small">PM 20:13</span>
                                            <span class="text-muted small">I have a meetin...</span>
                                        </div>
                                    </a>
                                </ul>
                            </div>
                            <div class="dropdown-menu-footer text-right">
                                <ul class="list-inline small">
                                    <li class="list-inline-item">
                                        <a href="#">Mark All Read</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link nav-link-notify sidebar-open" data-sidebar-target="#notifications">
                            <i class="fa fa-bell"></i>
                        </a>
                    </li>
                    <li class="nav-item dropdown">
                        <a href="#" data-toggle="dropdown">
                            <figure class="avatar avatar-sm avatar-state-success">
                                <img class="rounded-circle" src="assets/media/image/avatar.jpg" alt="...">
                            </figure>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right">
                            <a href="profile.html" class="dropdown-item">Profile</a>
                            <a href="#" data-sidebar-target="#settings" class="sidebar-open dropdown-item">Settings</a>
                            <div class="dropdown-divider"></div>
                            <a href="login.html" class="text-danger dropdown-item">Logout</a>
                        </div>
                    </li>
                    <li class="nav-item d-lg-none d-sm-block">
                        <a href="#" class="nav-link side-menu-open">
                            <i class="ti-menu"></i>
                        </a>
                    </li>
                </ul>
            </div>

        </div>
    </nav>
    <!-- end::navbar -->

    <!-- begin::main content -->
    <main class="main-content">

        <div class="container-fluid">

            <!-- begin::page header -->
            <div class="page-header d-md-flex justify-content-between align-items-center">
                <h4>Basic Tables</h4>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb m-t-0">
                        <li class="breadcrumb-item"><a href="#">Dashboard</a></li>
                        <li class="breadcrumb-item"><a href="#">UI Elements</a></li>
                        <li class="breadcrumb-item"><a href="#">Tables</a></li>
                        <li class="breadcrumb-item active" aria-current="page">Basic Tables</li>
                    </ol>
                </nav>
            </div>
            <!-- end::page header -->

            <div class="row">
                <div class="col-md-12">
                    <!-- 数据列表 -->
                    <div class="card">
                        <div class="card-body">
                            <div class="table-responsive">

                                <!-- table -->
                                <table class="table" id="vtable">

                                    <thead>
                                        <tr>
                                            <th scope="col">管理员ID</th>
                                            <th scope="col">头像&姓名</th>
                                            <th scope="col">管理员状态</th>
                                            <th scope="col">创建时间&个人信息&密码</th>
                                            <th class="text-right" scope="col">操作</th>
                                        </tr>
                                    </thead>


                                    <!-- vue循环生成table行 tr-->
                                    <tbody>

                                        <div id="vsearch">
                                            <input type="text" v-model:value="searchuser" placeholder="请输入名字"><button
                                                @click="search_user">搜索</button><br>

                                        </div>




                                            <tr v-for="(p,index) in userlist" :key=p.id>
                                                <th scope="row">{{p.id}}</th>
                                                <td>{{p.name}}</td>
                                                <td>{{p.status}}</td>
                                                <td>{{p.creattime}}--{{p.personinfo}}--{{p.password}}</td>
                                                <td class="text-right">
                                                    <div class="dropdown">
                                                        <a href="#" class="btn btn-light btn-floating btn-icon btn-sm"
                                                            data-toggle="dropdown" aria-haspopup="true"
                                                            aria-expanded="false">
                                                            <i class="fa fa-ellipsis-v" aria-hidden="true"></i>
                                                        </a>
                                                        <div class="dropdown-menu dropdown-menu-right">
                                                            <button class="dropdown-item openud" type="button"
                                                                @click="update_user(p)">修改</button>
                                                            <button class="dropdown-item" type="button"
                                                                @click="delete_user(p.id)">删除</button>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            <Mypage></Mypage>

                                    </tbody>

                                    <!-- vue循环生成table行 -->
                                </table>
                                <!-- table -->
                            </div>
                        </div>
                    </div>


                </div>
            </div>

        </div>

    </main>
    <!-- 模态框 -->
 
        <div class="model-box" id="myupdata">
            <div class="content">
                <div class="title">
                    <span>修改用户id为{{updatauser.id}}的信息</span>
                    <i class="close">×</i>
                </div> 
                <form action="#">
                    <div class="form-input">
                        <input type="hidden"v-model:value="updatauser.id">
                        姓名：<input type="text"  v-model:value="updatauser.name"   /><br>
                        状态：<input type="text"  v-model:value="updatauser.status"  /><br>
                        信息：<input type="text"  v-model:value="updatauser.personinfo"  /><br>
                        密码：<input type="text" v-model:value="updatauser.password"  /><br>
<!--                        头像 <input type="file" accept="image/*" v-model:value="updatauser.headimage" enctype="multipart/form-data">-->
                    </div>
                    <div class="form-input">
                        <button @click="upuser">确认修改</button>
                    </div>
                </form>
            </div>
        </div>
  

    <!-- 模态框 -->
    <!-- end::main content -->

    <!-- begin::global scripts -->
    <script src="assets/vendors/bundle.js"></script>
    <!-- end::global scripts -->

    <!-- begin::custom scripts -->
    <script src="assets/js/custom.js"></script>
    <script src="assets/js/app.js"></script>
    <!-- end::custom scripts -->

    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <!-- 引入组件库 -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>

    <!-- 引入axios -->
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.21.1/axios.js"></script>
    <!-- 引入axios -->
    <!-- 引入vue -->
    <script src="JS/vue.js"></script>
    <!-- 引入vue -->
    <script src="JS/modal.vue"></script>
    <script type="text/javascript">
        const Mypage = Vue.extend({
            template:`<button @click="firstpage">首页</button> <button @click="prepage">上一页</button>第{{pagenumber}}页<button @click="nextpage">下一页</button>`,
            data(){
                return {
                    pagenumber:1,
                }
            },
            methods:{
                firstpage() {
                    this.pagenumber = 1
                    console.log(vm.pagenumber)
                    p = this.pagenumber
                    vm.getUser(p)
                },
                prepage() {
                    if(this.pagenumber>=2){
                        this.pagenumber-=1
                    }else{
                        this.pagenumber = 1
                    }
                    p = this.pagenumber
                    vm.getUser(p)
                },
                nextpage() {
                    this.pagenumber+=1
                    p = this.pagenumber
                    vm.getUser(p)
                },
            }
        })
        var vud = new Vue({
            el: '#myupdata',
            data: {
                user: '修改',
                updatauser:{},
            },
            methods: {
                upuser() {
                    p = this.updatauser;
                    axios.post('/user/update',
                        {   'id':p.id,
                            'name':p.name,
                            'status':p.status,
                            'personinfo':p.personinfo,
                            'password':p.password
                        })
                        .then(value=>{
                        if(!value.message){
                            alert('修改失败');
                        }
                    }).catch(error=>{
                    alert('网络错误'+error);
                })
                }
            }


        })
        var vm = new Vue({
            el: '#vtable',
            data: {
                // test:'123',
                userlist:'',


            },
            components:{
                Mypage:Mypage,
            },

            created() {
                this.getUser();
            },
            methods: {
                getUser(p) {
                    if(p){
                        p = '1'
                    }else{
                        p = p
                    }
                    axios.post('/user/queryPage', { 'pagenumber':p }).then(function (value) {
                        if (value.data.userlist) {
                            // this.$set(this.userlist,this.userlist,value.data.userlist);
                            vm.userlist =null;
                            vm.userlist = value.data.userlist;
                            console.log(this.userlist);
                        } else {
                            alert('暂无在职管理员');
                        }
                    }).catch(function (error) {
                        alert('网络错误')

                    })

                },
                update_user(p) {
                    console.log('更新')
                    const mbox = document.querySelector('.model-box')
                    mbox.style.display = 'block';
                    vud.user = p.id;
                    vud.updatauser = p;
                    console.log(vud.updatauser);
                },
                //删除操作
                delete_user(id) {
                    console.log(id)
                    axios.post('/user/dimission', {
                        id: id,
                    }).then(function (value) {
                        if (message) {
                            user_list = user_list.filters(item => item.id != id);
                        }
                        else {
                            alert('删除失败');
                        }
                    }).catch(function (error) {
                        alert('网络错误');

                    })
                },
            },
        })
        var vms = new Vue({
            el: '#vsearch',
            data: {
                searchuser: '',
                user: '修改',
            },
            methods: {

                search_user() {
                    console.log("查询")
                    console.log(this.searchuser);
                    axios.post('/user/queryName', { name: this.searchuser }).then(function (value) {
                        if (value.data.userlist) {
                            vm.userlist = '',
                            vm.userlist = value.data.userlist;
                        } else {
                            alert('查无此人');
                        }
                    }).catch(function (error) {
                        alert('网络错误')

                    })
                },
            },
        })

    </script>

</body>

</html>